package com.cmc.cloud.cmclink.doc.vo.sovo.sosplitcombinedetailvo;

import com.cmc.cloud.cmclink.doc.configuration.CustomLocalDateTimeSerializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;

/**
 * 订舱拆分合并记录表   Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 *
 * @author codegen
 */
@Data
public class SoSplitCombineBaseVO {

    @Schema(description = "操作编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{sosplitcombine.operationno.notblank}")
    @Length(max = 30, message = "{sosplitcombine.operationno.length}")
    private String operationNo;

    @Schema(description = "提单号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{sosplitcombine.blno.notblank}")
    @Length(max = 50, message = "{sosplitcombine.blno.length}")
    private String blNo;

    @Schema(description = "审批状态 PENDING待处理 APPROVED已批准 REJECTED已拒绝", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotBlank(message = "{sosplitcombine.approvestatus.notblank}")
    @Length(max = 20, message = "{sosplitcombine.approvestatus.length}")
    private String approveStatus;

    @Schema(description = "操作类型 拆分 split 合并 combine", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotBlank(message = "{sosplitcombine.operationtype.notblank}")
    @Length(max = 20, message = "{sosplitcombine.operationtype.length}")
    private String operationType;

    @Schema(description = "申请人", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{sosplitcombine.applyuser.notblank}")
    @Length(max = 64, message = "{sosplitcombine.applyuser.length}")
    private String applyUser;

    @Schema(description = "申请时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @JsonSerialize(using = CustomLocalDateTimeSerializer.class)
    private LocalDateTime applyTime;

    @Schema(description = "审批人")
    @Length(max = 64, message = "{sosplitcombine.approveuser.length}")
    private String approveUser;

    @Schema(description = "审批时间")
    @JsonSerialize(using = CustomLocalDateTimeSerializer.class)
    private LocalDateTime approveTime;


}
